package Game.Players.Units;

/**
 * Created by Dmitriy on 17.12.2014.
 */
public class MeatBox extends Unit{
    private int armor = 0;
    Weapons[] weapon = {null, null};

    private MeatBox(String _name, int _health, int _armor, TMeatBox type){
        name = _name;
        health = _health;
        armor = _armor;
        level = 6;
        squadSize = 1;
        Weapons.makeWeaponz(type, weapon);
        //Meatboxes have 1-2 possible attacktypes and very huge HP. Or super-regen. Or very very huge HP and Anti-regen (in WH40000 Bloodthirster has);
    }
    public static MeatBox make(TMeatBox type){
        MeatBox constr;
        switch (type) {
            case Avatar:
                constr = new MeatBox("Avatar", 1000, 30, type);
                break;
            case Nightbringer:
                constr = new MeatBox("Nightbringer", 1000, 30, type);
                break;
            case Daemon_Prince:
                constr = new MeatBox("Daemon Prince", 1000, 30, type);
                break;
            case Bloodthirster:
                constr = new MeatBox("Bloodthirster", 1000, 30, type);
                break;
            case Great_Knarloc:
                constr = new MeatBox("Great Knarloc", 1000, 30, type);
                break;
            default:
                constr = new MeatBox("", 0, 0, null);
                break;
        }
        return constr;
    }

    public int getArmor(){
        return armor;
    }

    public void decreaseArmor(int a){
        armor -= (a < 0 ? 0 : a);
    }

}
